<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <script src="https://lib.baomitu.com/socket.io/4.1.3/socket.io.js"></script> 
</head>
<body>
  <ul id="message"></ul>
  <img id="main" />
  <script>
    // socket = io.connect('ws://127.0.0.1:3000');
    socket = io.connect('ws://192.168.2.27:3000');
    // socket.emit("message", {"name" : navigator.userAgent, "msg" : "hello world"});
    socket.on("message", function(obj) {
      console.log(obj);
      document.getElementById("main").src = obj.msg
    });
  </script>
</body>
</html>